/**
 * @license
 * Copyright 2024 The Model Explorer Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ==============================================================================
 */

.container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;

  svg-rednerer,
  webgl-rednerer {
    width: 100%;
    height: 100%;
  }

  .toolbar {
    position: absolute;
    top: 8px;
    left: 12px;
    padding: 0 8px 0 6px;
    box-sizing: border-box;
    height: 40px;
    display: flex;
    color: var(--me-on-surface-color);
    background-color: var(--me-surface-container-high-color);
    border-radius: 99px;
    align-items: center;
    outline: 2px solid var(--me-surface-color);

    &.in-popup {
      padding-left: 10px;
    }

    &:has(search-bar::ng-deep input:focus) {
      border-color: var(--me-primary-color);
    }

    search-bar {
      margin-right: 4px;
    }

    &.pushed-down {
      top: 44px;
    }

    .mat-icon-container {
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;

      &.enabled {
        background-color: var(--me-warning-container-color);
        outline: 1px solid var(--me-warning-text-color);
        border-radius: 4px;
      }

      &.disable {
        opacity: 0.2;
        pointer-events: none;
      }
    }

    mat-icon.toolbar-icon {
      font-size: 20px;
      width: 20px;
      height: 20px;
      cursor: pointer;
      opacity: 0.85;

      &:hover {
        opacity: 1;
      }

      &.expand-all,
      &.collapse-all {
        font-size: 18px;
        width: 18px;
        height: 18px;
      }

      &.flatten-layers {
        font-size: 20px;
        width: 20px;
        height: 20px;
        border: 1px solid transparent;
      }

      &.trace {
        transform: rotate(90deg);
        border: 1px solid transparent;
      }
    }

    .vertical-divider {
      width: 1px;
      border-left: 1px solid var(--me-outline-variant-color);
      margin: 2px 5px;
      height: 20px;
    }

    edge-overlays-dropdown {
      margin-left: 4px;
    }
  }

  subgraph-breadcrumbs {
    position: absolute;
    top: 8px;
    left: 12px;
  }
}

::ng-deep bubble-container:has(.model-explorer-view-popup) {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

::ng-deep .model-explorer-download-png-menu {
  /* stylelint-disable-next-line declaration-no-important -- override MDC */
  color: var(--me-on-surface-color) !important;
  /* stylelint-disable-next-line declaration-no-important -- override MDC */
  background-color: var(--me-surface-container-low-color) !important;

  .menu-item {
    /* stylelint-disable-next-line declaration-no-important -- override MDC */
    letter-spacing: normal !important;
    /* stylelint-disable-next-line declaration-no-important -- override MDC */
    font-family: 'Google Sans Text', Arial, Helvetica, sans-serif !important;
    font-size: 12px;
    padding: 0 8px;
    cursor: pointer;
    display: flex;
    align-items: center;

    &:hover {
      background-color: var(--me-surface-container-high-color);
    }
  }

  .transparent-background-toggle {
    display: flex;
    align-items: center;
    font-size: 12px;
    letter-spacing: normal;
    padding: 6px 8px 0 4px;
    border-top: 1px solid var(--me-outline-variant-color);
    margin-top: 8px;
    cursor: pointer;

    input {
      cursor: inherit;
    }
  }
}
